`timescale 1ns/1ns

module dut(
clk,
rstn,
);

input clk;
input rstn;

reg [31:0] data;

//Add import funciton declaration
import "DPI-C" function void print_count(input bit [31:0] count);

always@(posedge clk or negedge rstn)
if(~rstn) begin
	data <= 0;
end
else begin
   	data <= data + 1;
end

wire out_enable = (data[3:0]==7);

always@(posedge clk)
if(out_enable) begin
	print_count(data);
end

endmodule	
